import config from "@/config"
import http from "@/utils/request"

export default {
    page: {
        url: `${config.API_URL}/system/group/page`,
        name: "组织分页查询",
        get: async function(params){
            return await http.get(this.url, params);
        }
    },
    firstTree: {
        url: `${config.API_URL}/system/group/firstTree`,
        name: "一级组织树查询",
        get: async function(params){
            return await http.get(this.url, params);
        }
    },
    tree: {
        url: `${config.API_URL}/system/group/tree`,
        name: "组织树查询",
        get: async function(params){
            return await http.get(this.url, params);
        }
    },
    save: {
        url: `${config.API_URL}/system/group/save`,
        name: "保存组织",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    deletes: {
        url: `${config.API_URL}/system/group/deletes`,
        name: "批量删除组织",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    }
}